The invention relates to a data carrier and an integrated circuit.
Such a data carrier is known from the document WO99/50738 and takes the form of a transponder of a smart card. The known data carrier is adapted to communicate transmission information to or from a communication station. In order to process and store transmission information received by communication device of the data carrier the known data carrier has program memory, data memory and computing module.
The program memory stores the program code of a processing program which defines the functionality of the transponder. The computing modules are adapted to read the program codes stored in the program memory and to execute the processing program. Transmission information received by the communication device is then processed in accordance with the processing program and is stored, if applicable, in the data memory as data information. Likewise, data information stored in the data memory can be processed by the computing module in accordance with the processing program and can be transmitted to the communication station by the communication device as transmission information.
The program code includes program code lines which each include instruction information and, if applicable, address information and data information. The instruction information includes command information and, if applicable, address mode information. The address mode information and the address information identify a memory location of the program memory or the data memory.
It has been found that the known data carrier has the drawback that the computing module (for example a 80C51 processor) allow only a very limited number (for example 256) of instruction information units to be used. For the programmer of the program codes both the commands executable by the computing modules and the address modes executable by the computing module for access to a memory location are dictated by the limited number of instruction information units, which number is determined almost wholly by the manufacturer of the computing module. This has the drawback that an optimization of the instruction information for the relevant functionality of a transponder, in order to achieve a most efficient program code, which saves both memory space and computing time and also precludes a high power consumption of the transponder, is virtually impossible.
For these computing module tools necessary for drawing up the program code (for example assemblers, compilers, emulators) are available but these can be utilized only in the case of compliance with the instruction information laid down by the manufacturer of the computing means. Since a modification of these tools would involve a substantial effort a change of the instruction information is substantially impossible for economic reasons.
Moreover, a change of the instruction information in order to optimize the program code would have the drawback that previous program codes, which already may have been in use for years and which are therefore highly reliable, cannot be used as part of a new program code because the code of the modified instruction information would have another meaning.
It is an object of the invention to provide a data carrier and an integrated circuit in which the program code can be optimized by means of additional commands or address modes and which in spite of this allow the continued use of existing instruction information and tools. This object of enabling additional address modes to be obtained is achieved by means of the measures defined in the characterizing part of claim 1 in the case of a data carrier as defined in the opening part of claim 1 and by the measures defined the characterizing part of claim 7 in the case of an integrated circuit as defined in the opening part of claim 7.
Thus, it is achieved that in the case of specific address information included in a program code line additional hardware, i.e. address mode extension module, is activated which determines additional address mode information stored in the data memory or the program memory, which address mode information is characteristic of a further address mode not available in the instruction information provided by the manufacturer of the computing module. Depending on the address mode thus determined the address mode extension module determine additional address information with which the data memory or program memory can be accessed by an access stage and the data information thus determined is supplied to the computing module.
Making further address modes possible has the advantage that further possibilities are obtained for optimizing the program codes for the data carrier and, in addition, enables the tools offered with the computing module to be used because the further address modes are characterized by specific address information and not by additional instruction information.
It is to be noted that address extension module for computing module are known from the document U.S. Pat. No. 5,918,243, which include ten registers and ten offset registers, each register having an associated offset register. When the address information which characterizes one of these registers is included in a program code line executed by the computing module, the address information stored in the offset register is added to the address information stored in the register so as to determine additional address information. However, this program code line executed by computing module should include additional address mode information in the instruction information in order to achieve the addition of the address information stored in the register and that in the offset register.
However, this leads to the afore-mentioned drawback that this additional address mode information would have to be included for different command information and would require a large amount of additional instruction information, which has the disadvantage that the available tools cannot be used for such a program code to be executed by the computing module.
According to one aspect of the invention, it possible for the address mode extension module to determine the program memory or data memory designated for the access by analysis of the detected additional address mode information. This is particularly advantageous when address information identifies a memory location in the program memory as well as another memory location in the data memory.
According to another aspect of the invention it possible that, for example, the third entry in an address information table is identified by the additional address mode information, upon which the address information in this third entry of the address information table is used as additional address information for the access to a memory location. Likewise, the additional address information ZAI determined by an addition of this address information AI in the third entry of the address information table to address information AI included in the program code line PCZ could be used for the access to a memory location. These additional address modes could provide a further optimization of the program code PC.
Yet another aspect of the invention is to enable address modes for the optimization of the program code to be obtained. For example, additional address mode information may identify an address mode in which an address decrementing operation is performed only after a read access.
Thus, it is achieved that for specific address information included in a program code line additional hardware, i.e. command extension means, is activated, which additional hardware determines additional command information stored in the data memory means or the program memory means and identifying a further additional command not available in the instruction information provided by the manufacturer of the computing means. For example, the register content or the count of the program counter of the computing means are changed in accordance with the detected additional command, in order to give the computing means an additional functionality during the processing of the command information of one of the following program code lines.
The fact that additional commands are possible has the advantage that further possibilities of optimizing the program code for the data carrier and, in addition, the tools available for the computing means can be used because the additional commands are identified by specific address information and not by additional instruction information.